#ifndef LEDMANAGER_H
#define LEDMANAGER_H

#include <QColor>
#include "IPlugin.h"
#include "Plugin.h"
#include "Spi.h"

class LedManager : public Plugin, public IPlugin
{
   Q_OBJECT
   Q_INTERFACES(IPlugin)

public:
   LedManager();

   Plugin* getPlugin();
   void initializeLedStrip();

public slots:
   void slotStartService();
   void slotStopService();
   void slotConfigUpdate(const QString &key,
                         QVariant &value);
   void slotEventNotification(Event event);

   void slotSetColor(quint32 led,
                     QColor color);

protected:
   Spi theSpi;
   quint32 theNumberLeds;
   QByteArray theStripData;

   static const quint8 COLOR_ENABLE_MASK;
   static const quint32 SPI_DEVICE;
   static const quint32 NUM_COLORS;
};

#endif // LEDMANAGER_H
